Good morning Statlist community,
I have been trying to get round this problem on my own but have struggled to find the correct syntax, my question is how should I code for a time-specific independent variable in my fixed effects ordinal model.
I am utilising the feologit and xtreg function for two different dependent variable (one being ordinal, the other continuous) which measure self-perceived employability. I am using panel data and would like to include the national unemployment rate in my model which is constant over time. I originally planned to use the following code
self_percp_nor is my ordinal depedent variable and i257_nor is my alternative continuous variable reporting self-perceived employability. Where i.age_cat is an ordinal variable representing age categories and ned_unemp_rate is the dutch unemployment rate.
I feel like this is might be a mistake and I am wondering if I would be better off treating it as a factor variable (although I am aware these can't contain noninteger values). As I write this I realise I could utilise my _Year variable as a proxy for unemployment rate. However , ideally I would like my model to show that a 1% increase leads to a change of x in self perception and I am struggling to see if this would be possible.
Dataex code is below:
Thank you,
Hugo
I have been trying to get round this problem on my own but have struggled to find the correct syntax, my question is how should I code for a time-specific independent variable in my fixed effects ordinal model.
I am utilising the feologit and xtreg function for two different dependent variable (one being ordinal, the other continuous) which measure self-perceived employability. I am using panel data and would like to include the national unemployment rate in my model which is constant over time. I originally planned to use the following code
Code:
feologit self_percp_nor i.age_cat ned_unemp_rate xtreg i257_nor i.age_cat ned_unemp_rate, fe
I feel like this is might be a mistake and I am wondering if I would be better off treating it as a factor variable (although I am aware these can't contain noninteger values). As I write this I realise I could utilise my _Year variable as a proxy for unemployment rate. However , ideally I would like my model to show that a 1% increase leads to a change of x in self perception and I am struggling to see if this would be possible.
Dataex code is below:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double _nomem_encr int _Year float(self_percp_nor age_cat) double i257 float ned_unemp_rate 800009 2009 . . . 4.4 800009 2015 . 4 . 6.9 800009 2013 . . . 7.3 800009 2014 . 3 . 7.4 800009 2008 . . . 3.7 800009 2018 . 4 999 3.8 800009 2016 . 4 999 6 800009 2010 . . . 5 800009 2011 . . . 5 800009 2012 . . . 5.8 800009 2017 . 4 999 4.9 800009 2019 . 4 . 3.4 800015 2008 . . . 3.7 800015 2009 . 2 . 4.4 800015 2011 . 2 . 5 800015 2017 . 2 . 4.9 800015 2013 . 2 . 7.3 800015 2012 . 2 . 5.8 800015 2016 . 2 . 6 800015 2015 . 2 . 6.9 800015 2019 . 3 . 3.4 800015 2018 . 3 . 3.8 800015 2014 . 2 . 7.4 800015 2010 . 2 . 5 800042 2019 . 2 . 3.4 800042 2015 . 1 999 6.9 800042 2011 4 1 80 5 800042 2009 0 1 0 4.4 800042 2010 0 1 0 5 800042 2012 . 1 . 5.8 800042 2008 0 1 0 3.7 800042 2014 . 1 999 7.4 800042 2013 . 1 999 7.3 800042 2016 . 2 999 6 800042 2017 . 2 . 4.9 800042 2018 . 2 . 3.8 800057 2019 . 2 . 3.4 800057 2014 . 1 . 7.4 800057 2013 . 1 . 7.3 800057 2008 . 1 . 3.7 800057 2012 . 1 . 5.8 800057 2017 . 2 . 4.9 800057 2011 . 1 . 5 800057 2016 . 2 . 6 800057 2015 . 2 . 6.9 800057 2009 . 1 . 4.4 800057 2018 . 2 . 3.8 800057 2010 . 1 . 5 800073 2019 . 4 . 3.4 800073 2018 . 4 . 3.8 800073 2015 . . . 6.9 800073 2016 . . . 6 800073 2017 . 4 . 4.9 800085 2017 5 2 . 4.9 800085 2013 . . . 7.3 800085 2019 . 2 . 3.4 800085 2012 . . . 5.8 800085 2014 . 1 . 7.4 800085 2009 . . . 4.4 800085 2016 . 1 . 6 800085 2015 . 1 . 6.9 800085 2018 . 2 . 3.8 800085 2010 . . . 5 800085 2008 . . . 3.7 800085 2011 . . . 5 800100 2010 . . . 5 800100 2019 . 1 . 3.4 800100 2014 . . . . 800100 2011 . . . 5 800100 2018 4 1 80 3.8 800100 2015 . . . . 800100 2008 . . . 3.7 800100 2016 . 1 999 6 800100 2012 . . . 5.8 800100 2017 3 1 999 4.9 800100 2013 . . . 7.3 800100 2009 . . . 4.4 800119 2013 . 4 999 7.3 800119 2011 0 4 0 5 800119 2014 . 4 . 7.4 800119 2009 0 3 0 4.4 800119 2015 . 4 . 6.9 800119 2010 0 3 0 5 800119 2008 0 3 0 3.7 800119 2012 . 4 . 5.8 800125 2011 . . . 5 800125 2012 . . . 5.8 800125 2009 6 2 100 4.4 800125 2013 . . . 7.3 800125 2008 3 2 35 3.7 800125 2010 . 2 . 5 800125 2014 . . . 7.4 800131 2015 . . . . 800131 2016 . 4 . 6 800131 2011 . 3 . 5 800131 2009 . 3 . 4.4 800131 2014 . 4 . 7.4 800131 2012 . 3 . 5.8 800131 2013 . 3 . 7.3 800131 2017 . 4 . 4.9 end format %ty _Year label values age_cat agecat_2lb label def agecat_2lb 1 "26-39", modify label def agecat_2lb 2 "40-54", modify label def agecat_2lb 3 "50-59", modify label def agecat_2lb 4 "60-67", modify label values i257 ci14g257 label def ci14g257 999 "n/a since I am not looking for a job", modify
Hugo